Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a default theme system for A2UI, including a new theme injection utility and CSS variable definitions. The Button and Text components across the basic and minimal catalogs have been updated to utilize these styles. Feedback points out a critical SSR compatibility issue where the document object is accessed without a check, an inconsistent fallback color for button hovers, and significant code duplication between catalogs that should be refactored into shared utilities or base classes.
cd49d59 to
1ec1849
Compare
jacobsimionato
left a comment
There was a problem hiding this comment.
LGTM other than this one comment
c975b99 to
0ad9206
Compare
The function allows basic catalog implementations to inject a shared stylesheet that contains a set of overridable variables used by the widgets to keep the styling somewhat consistent.
|
PTAL @ava-cassiopeia @jacobsimionato (if you go down the PR chain you can see how this ends up being used!)
|
| } | ||
|
|
||
| :where(:root), :where(.a2ui-dark), :where(.a2ui-light) { | ||
| --a2ui-color-background: light-dark(#eee, #111); |
There was a problem hiding this comment.
Happy with this as a start, but let's figure out how to honor primaryColor in the agent-provided surface theme also.
Description
This is some initial work for the CSS styling of the v0.9 of the renderers. On this version, only the "Button" component is styled.
The idea is to give global CSS variables that users can control in a more or less granular fashion, and some widget-defined variables.
The only widget I've really touched so far is the Lit Button, as a PoC. It is eyeball tested in the v0.9 gallery sample app for now.
Pre-launch Checklist
If you need help, consider asking for advice on the discussion board.